﻿using J.Status.Application.Command.RoomNumCommand;
using J.StatusModel;
using MediatR;
using StatusService;

namespace J.Status.Application.Handler.RoomNumHandler
{
    public class RoomStateSelectHandler:IRequestHandler<RoomStateSelectCommand, List<RoomNumManage>>
    {
        private readonly IRoomNumManageService roomNumManageService;
        public RoomStateSelectHandler(IRoomNumManageService roomNumManageService)
        {
            this.roomNumManageService = roomNumManageService;
        }

        public async Task<List<RoomNumManage>> Handle(RoomStateSelectCommand request, CancellationToken cancellationToken)
        {
            return await roomNumManageService.RoomStateShow(request.RoomTypeId, request.RoomStateId, request.OtherId);
        }
    }
}
